import 'dart:convert';

import 'package:safetymonitor/app/data/common/choice_bean.dart';
import 'package:safetymonitor/generated/json/base/json_field.dart';
import 'package:safetymonitor/generated/json/risk_point_entity.g.dart';
export 'package:safetymonitor/generated/json/risk_point_entity.g.dart';

/// 风险点实体
@JsonSerializable()
class RiskPointEntity extends ChoiceBean {
  RiskPointEntity();

  factory RiskPointEntity.fromJson(Map<String, dynamic> json) => $RiskPointEntityFromJson(json);
  late int id = 0;
  late int companyId = 0;
  late String riskName = '';
  late int responsibleDeptId = 0;
  late String responsibleDeptName = '';
  late int responsibleUserId = 0;
  late String responsibleUserName = '';
  late int recognizeDeptId = 0;
  late String recognizeDeptName = '';
  late int recognizeUserId = 0;
  late String recognizeUserName = '';
  late int longitude = 0;
  late int latitude = 0;
  late int height = 0;
  String createTime = '';

  Map<String, dynamic> toJson() => $RiskPointEntityToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }

  @override
  String getId() {
    return id.toString();
  }

  @override
  String getShowName() {
    return riskName;
  }
}
